home *** CD-ROM | disk | FTP | other *** search
/ Programming in Microsoft Windows with C# / Programacion en Microsoft Windows con C#.iso / Original Code / Images and Bitmaps / ProgramWithIcon / ProgramWithIcon.cs next >
Encoding:
Text File  |  2001-01-15  |  549 b   |  21 lines

  1. //-------------------------------------------
  2. // ProgramWithIcon ⌐ 2001 by Charles Petzold
  3. //-------------------------------------------
  4. using System;
  5. using System.Drawing;
  6. using System.Windows.Forms;
  7.  
  8. class ProgramWithIcon: Form
  9. {
  10.      public static void Main()
  11.      {
  12.           Application.Run(new ProgramWithIcon());
  13.      }
  14.      public ProgramWithIcon()
  15.      {
  16.           Text = "Program with Icon";
  17.  
  18.           Icon = new Icon(typeof(ProgramWithIcon), 
  19.                           "ProgramWithIcon.ProgramWithIcon.ico");
  20.      }
  21. }